package com.example.tests;

import java.util.Set;
import java.util.logging.Logger;

import org.testng.annotations.Test;

import com.example.tests.GroupDataGenerator;


public class GroupCreationTests extends TestBase 	{
	
	private Logger log = Logger.getLogger("groupCreatonTests");

	
	@Test(dataProvider = "groupsFromFile", dataProviderClass = GroupDataGenerator.class)
	public void testValidGroupCanBeCreated(GroupObject validGroup) throws Exception {
		log.info("testValidGroupCanBeCreated start");
		Set<GroupObject> oldList = app.getGroupHelper().getGroups();
		log.info("oldList=" + oldList);
		app.getGroupHelper().createGroup(validGroup);
		Set<GroupObject> newList = app.getGroupHelper().getGroups();
		log.info("newList=" + newList);
		verifyGroupAdded (oldList, validGroup, newList);
		log.info("testValidGroupCanBeCreated end");
	}
}
